<template>
  <div class="avue-logo">
    <transition name="fade">
      <!-- <span v-if="keyCollapse"
            class="avue-logo_subtitle"
            key="0">
        {{website.logo}}
      </span>-->
      <img
        v-if="keyCollapse"
        key="0"
        alt=""
        class="avue-logo-img"
        src="/img/logo.png"
      />
    </transition>
    <transition-group name="fade">
      <!--<template v-if="!keyCollapse">
        <span class="avue-logo_title"
              key="1">{{website.indexTitle}} </span>
      </template>-->
      <div v-if="!keyCollapse" key="1" class="logoinfo">
        <img alt="" src="/img/logo.png" />
        <!-- <div style="text-align:center;">{{website.indexTitle}}</div> -->
      </div>
    </transition-group>
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  name: "logo",
  data() {
    return {};
  },
  created() {},
  computed: {
    ...mapGetters(["website", "keyCollapse"]),
  },
  methods: {},
};
</script>

<style lang="scss">
.fade-leave-active {
  transition: opacity 0.2s;
}

.fade-enter-active {
  transition: opacity 2.5s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

.avue-logo-img {
  height: 30px;
  // border-radius: 50%;
  margin: 20px 5px;
}

.logoinfo {
  display: flex;
  /*flex-direction: column;*/
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  font-size: 16px;
}

.logoinfo img {
  width: 130px;
  // width: 100%;
  // border-radius: 50%;
  margin-bottom: 10px;
  margin-right: 10px;
}

.avue-logo {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 64px;
  padding: 10px;
  line-height: 28px;
  /*background-color: #20222a;*/
  font-size: 20px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.8);
  z-index: 1024;

  &_title {
    display: block;
    text-align: center;
    font-weight: 300;
    font-size: 16px;
  }

  &_subtitle {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
  }
}
</style>
